<%@ page contentType="text/html; charset=UTF-8"%>
<%@ page pageEncoding="UTF-8"%>
<!DOCTYPE html>
<%@include file="template/header.jsp"%>
<%@include file="template/navigation.jsp"%>
<%@include file="template/menu.jsp"%>
<div>

	<table id="box-table-a" summary="Employee Pay Sheet">
		<thead>
			<tr>
				<th scope="col">Nom</th>
				<th scope="col">Prénom</th>
				<th scope="col">Mail</th>
				<th scope="col">téléphone</th>
				<th scope="col">Type</th>
				<th scope="col">Service</th>
				<th scope="col">ACTION</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${fetchedSurveillants}" var="surveillant">
				<tr>
					<td><c:out value="${surveillant.nom}" /></td>
					<td><c:out value="${surveillant.prenom}" /></td>
					<td><c:out value="${surveillant.mail}" /></td>
					<td><c:out value="${surveillant.tel}" /></td>
					<td><c:choose>
							<c:when
								test="${surveillant.getClass().name=='com.surveillance.entities.Enseignant'}">
							Enseignant
						</c:when>
							<c:otherwise>
							Résident
						</c:otherwise>
						</c:choose></td>
					<td><c:out value="${surveillant.service.nom}"></c:out></td>
					<td class="td1"><select
						onChange="location = this.options[this.selectedIndex].value;">
							<option value="#">--Action--</option>
							<option
								value="surveillant/update?id=<c:out value="${surveillant.id}"/>">modifier</option>
							<option
								value="surveillant/delete?id=<c:out value="${surveillant.id}"/>">supprimer</option>
					</select></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
	<a href="surveillant/add"  class="button blue" style="margin-left:450px;">+ ajouter surveillant</a>
</div>
<%@include file="template/footer.jsp"%>
